Method for processing error code of compressed image in transmission

ABSTRACT

A method for processing error codes in compressed encoded images transmission is disclosed. In this method, when error codes have been detected at the receiving end, the image code stream data with error codes is discarded before decoding the image code stream data, and the discarded image code stream data is replaced with the image code stream data located at the corresponding location of the previous frame, and image code stream data is decoded continually. More preferably, the method further comprises: setting a mark array for the image code stream data before decoding at the receiving end to record the locations where error codes have been detected. With this method, sending intra-frame images at transmitting end and freezing images at receiving end are avoided or their occurrence times is reduced, so image quality is thus improved.

FIELD OF THE TECHNOLOGY

The invention relates to image transmission field in multimediacommunication, especially to a method for processing error codesproduced in compressed encoded images transmission.

BACKGROUND OF THE INVENTION

The image transmission technology, especially the technology ontransmitting the compressed encoded images, has been wildly used invideoconferences and videophones. In real-time bi-directional videocommunication, such as videoconference, the video information iscompressed into code stream data for transmission according tointernational standards. H.26X standards proposed by ITU-T, such asH.261 and H.263, are common ones used for encoding images at present. Inthe H.26X standards, the format of digital video is defined as CommonIntermediate Format (CIF) and Quarter Common Intermediate Format (QCIF)that are unified image formats for videoconferences. These image formatscan be used in different international television standards, such asPAL, NTSC and SECAM etc.

Taking the CIF format as an example, the structure of digital videoformats defined in the H.26X standards will be briefly described. FIG. 1and FIG. 2 respectively show the constitution of the H.261 CIF formatand the H.263 CIF format. As shown in FIG. 1 and FIG. 2, each imageframe is divided into multiple Groups of Blocks (GOBs), and each GOB isdivided into multiple macro-blocks (MB). The MB can be divided further,but since it does not relate to the present invention, it will not befurther described. In accordance with the image formats, code streamdata of a compressed encoded image formed according to the H.26Xstandards is arranged into multiple layers during transmission. Amongthese layers, the image layer consists of an image layer header and datain the GOB layer, the GOB layer consists of a GOB layer header and datain the MB layer, the MB layer consists of a MB layer header and data inthe next layer, and so on. Since the redundancy of a compressed codestream is low, the image quality at the receiving end is greatlyaffected by transmission channel error codes produced in transmission.

In general, an error code detection manner is used at the receiving end,such as the Forward Error Correction (FEC). When an error code isdetected, the displaying image at the receiving end is frozen, namely,the process of decoding image data to video data which can be broadcastdirectly is paused. At the same time, a FastUpdate command is sent fromthe receiving end to the transmitting end through conference control.After receiving the FastUpdate command, the transmitting end encodes thecurrent frame through encoding within frame and sends the encoded frame,and sets the location of Freeze Release bit in code streams asvalidness. After detecting the location of Freeze Release bit in codestreams is set as validness, the receiving end cancels display freezing,and decodes image data to video data which can be broadcast directlycontinually.

The disadvantage of the prior art is that even there are few errorcodes, freezing images and intra-frame encoded images with low qualitywill frequently appear during decoding image data. Especially in amultipoint videoconference, when a terminal is broadcasting, if errorcodes appeared in lines of a certain receiving terminal, intra-frameencoded images with low quality will frequently appear in all of theterminals used in the videoconference owing to the above-mentionedprocessing manner for error codes. Usually, this is unacceptable forusers.

SUMMARY OF THE INVENTION

It is an object of the invention to provide a method for processingerror codes in transmitting compressed encoded images. With this method,it can be achieved to avoid transmitting intra-frame images at thetransmitting end and freezing images at the receiving end or reducetheir occurrence times. In this way, the quality of images can beimproved.

To achieve this object, a method according to the present inventioncomprises: when having detected error codes at the receiving end,discarding the image code stream data with error codes before decodingimage code stream data, and replacing the discarded image code streamdata with the image data located at the corresponding location of theprevious frame, then decoding image code stream data continually.

More preferably, the method further comprises: setting a mark array forthe image code stream data before decoding at the receiving end torecord the locations where error codes have been detected.

More preferably, the image code stream data with error codes to bediscarded before decoding the image code stream data at the receivingend is the data in GOB with error codes under the condition that theimage encoding standard is H.261.

More preferably, the step of discarding the image code stream data witherror codes before decoding image code stream data under the conditionthat the image encoding standard is H.263 comprises:

if error codes have been detected in the first GOB of a frame,discarding all data in the whole frame; or

if error codes have been detected in a certain GOB other than the firstGOB of a frame, and if the GFID of the GOB with error codes is identicalwith the GFID of the next GOB, discarding data in the GOB with errorcodes; or

if error codes have been detected in a certain GOB other than the firstGOB of a frame, and if the GFID of the GOB with error codes is notidentical with the GFID of the next GOB, backwardly searching the nextframe header at the receiving end, and discarding all data between astarting position of the GOB with error codes and a starting position ofthe next frame header.

More preferably, the method further comprises: setting a fixed number ofMBs in each frame to an intra-frame encoding mode at the transmittingend, and making said MBs of adjacent frames be adjacent in position onthe screen.

More preferably, the number of MBs which are set to the intra-frameencoding mode in each frame for CIF images is three, and the number ofthose for images with other formats can be proportionally adjustedaccording to the size of images.

More preferably, different processing principles are applied for moreerror codes situation and less error codes situation. When there is moreerror codes situation, a special image is outputted at the receivingend.

Compared with the prior art, the actual requirements of users and theactual situation of videoconference has been considered more in thepresent invention, so it can be achieved to avoid transmittingintra-frame images at the transmitting end and freezing images at thereceiving end or reduce their occurrence times with the presentinvention. Since scenes of a conference have few changes, the errorcodes can be well concealed and the quality of images is thus improved.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 shows the constituent structure of the H.261CIF format.

FIG. 2 shows the constituent structure of the H.263CIF format.

DETAILED DESCRIPTION OF THE INVENTION

The invention will be described in more detail hereinafter, withreference to the accompanying drawings and embodiments.

In the prior art, the receiving end immediately freezes the displayingimages after detecting error codes, and sends a FastUpdate command tothe transmitting end through the conference control. When receiving thecommand, the transmitting end immediately encodes the current framethrough encoding within frame and sends it, and sets the Freeze Releasebit in the code stream as validness. After detecting the location ofFreeze Release bit is set as validness, the receiving end releases thefrozen displaying images. With this method for processing error codes,even there are few code errors, freezing images and intra-frame encodedimages with low quality will frequently appear during decoding imagedata, which dissatisfies the users.

The inventors of the present invention recognize that because the sceneschange quite few during a videoconference or a videophone communication,the data with error codes can be replaced with the data located at thesame location of the previous frame in many circumstances, without theneed of freezing the image and retransmitting the data. With thisprocessing method, the quality of images at the receiving end can beimproved, and it is more acceptable for users than the prior art.

In a preferred embodiment of the invention, the received code stream atthe receiving end is first checked by CRC (Cyclic Redundancy Check).Then the video data is transferred to the video decoding layer through avideo-receiving buffer. The video data in the video-receiving buffer isFEC frame data. After the data has been checked and its frame formatshave been taken out by the decoder, pure image code stream data isextracted from the data. The pure image code stream data is put in apure code stream buffer waiting for decoding. In this preferredembodiment, a mark array used for recording location where error codeshave been detected is set for the pure code stream buffer. The markarray may correspond with the pure code stream buffer one element by oneelement. This means that length of the mark array equals to length ofcode stream data in the pure code stream buffer, and each element valueof the mark array shows whether the corresponding bit of the code streamdata is an error code.

In this embodiment, the error codes situations can be divided into twocategories: more error codes situation and less error codes situation,and they are processed respectively.

For few error codes situation, error detection is first made with theFEC method which is recommended by the H.261 and H.263 standards. Ifthere are error codes, the FEC frame is discarded, and the correspondinglocation of the mark array is marked with a sign representing an errorcode.

When processing a pure code stream data without the FEC frame, firstcheck whether there is any sign representing an error code in the markarray. If there is no error code mark, directly send the data to thecode stream decoding module. If there is an error mark or there areerror marks, it is need to perform a processing for discarding data.When the H.263 standard is used, this processing comprises the followingthree steps:

A. determining the sequence number of GOB where the error codes havebeen detected and the starting position of the GOB in the buffer, whichcan be done by forwardly searching the GOB header;

B. if the GOB is the first GOB of a frame, then backwardly searching theframe header of the next frame and discarding all data in the wholeframe where the error codes have been detected; and

C. if the GOB is not the first GOB of a frame, forwardly searching theframe header of the previous GOB and recording the GFID, meanwhilebackwardly searching the frame header of the next GOB and recording theGFID; if these two GFIDs are identical, discarding data in the GOB witherror codes; otherwise backwardly searching the frame header of the nextframe and discarding all data between the starting position of the GOBwith error codes and that of the next frame header. The above-mentionedGFID is a mark bit defined in the H.263 standard; it represents thesequence number of the frame where the GOB is located. If two GFIDs aredifferent, it shows the two GOBs are located at different frames. Incontrast, if two GFIDs are identical, it shows the two GOBs are locatedat the same frame.

When the H.261 standard is used, the processing for discarding data isimplemented as follow. Determine the starting position of the GOB wherethe error codes have been detected and the starting position of the nextGOB in the buffer, and discard all data between these two startingpositions. This can be done by forwardly and backwardly searching theGOB headers.

After discarding data has been done, error covering is done at thedecoding end, namely, the discarded image data is replaced with thecorresponding data in the previous frame.

After the above-mentioned processing, since the scenes of avideoconference have few changes, the few error codes can be wellcovered. But when an image has a large moving object, after saidprocessing, the moving part will remain an obvious trial. A forcedintra-frame block encoding method can be applied to eliminate the trailexpansion. For a CIF image, no matter the original encoding mode is aninter-frame encoding mode or a mode without encoding, forcibly makethree MBs of every frame apply the intra-frame encoding mode. The threeMBs of a frame can be adjacent in position, such as the three MBs aresited one by one in a row, in a column, or in an orthogonal line. Thethree MBs can be separate in position also, but the three MBs of thepresent frame should be adjacent with those of the previous frame inscreen position. For example, the three MBs of the current frame areselected according to those of the previous frame with the increasing ordecreasing MB sequence number. Since the error expansion of an imagealways happens in adjacent MBs, trial expansion is more effectivelyeliminated by sequential mode than random mode.

For more error codes situation, even a processing has been made, theimage quality is still bad. In this case, a special image is outputted,such as a blue screen with captions showing that there existed errorcodes.

Compared with the prior art, the real requirements of users and theactual situation of videoconference has been considered more in thepresent invention, so it can be achieved to avoid freezing images at thereceiving end or reduce their occurrence times with the presentinvention. Since scenes of a conference have few changes, the errorcodes can be well concealed and the quality of images is thus improved.

Although the present invention has been described with reference tospecific exemplary embodiments, it will be evident that variousmodification and changes can be made to these embodiments withoutdeparting from the broader spirit of the invention as set forth in theclaims. Accordingly, the specification and drawings are to be regardedin an illustrative sense rather than in a restrictive sense.

1. A method for processing error codes of a compressed encoded image transmission on a receiving end, comprising: providing a processor for receiving and processing a compressed image code stream, wherein the processor is responsible for: a) implementing an error code check on the image code stream b) discarding a selected portion of image data within a frame determined to have errors; and c) replacing the discarded image data with corresponding data from a previously processed frame that was determined to be error free.
 2. The method of claim 1, further comprising: setting a mark array for the image code stream to record the locations where error codes have been detected.
 3. The method of claim 1, wherein the image encoding standard is H.261 and wherein the selected portion of image data with error codes to be discarded is the data in a Group of Blocks (GOB) with error codes.
 4. The method of claim 1, wherein discarding the selected portion of image data within a frame determined to have errors under the condition that the image encoding standard is H.263 comprises: if error codes have been detected in a first GOB of a frame, discarding all data in the whole frame; or if error codes have been detected in a GOB other than the first GOB of a frame, and if a GOB Frame Identification (GFID) of the GOB with error codes is identical with the GFID of a next GOB, discarding data in the GOB with error codes; or if error codes have been detected in a GOB other than the first GOB of a frame, and if the GFID of the GOB with error codes is not identical with the GFID of the next GOB, backwardly searching the next frame header at the receiving end, and discarding all data between a starting position of the GOB with error codes and a starting position of the next frame header.
 5. The method of claim 1, further comprising: setting a fixed number of Macro-Blocks (MBs) in each frame to an intra-frame encoding mode at the transmitting end, and making said MBs of adjacent frames be adjacent in position on screen.
 6. The method of claim 5, wherein the number of MBs which are set to the intra-frame encoding mode in each frame for Common Intermediate Format (CIF) images is three, and the number of MBs which are set to the intra-frame encoding mode in each frame for images with other formats can be proportionally adjusted according to the size of images.
 7. The method of claim 1, further comprising: making different processing for a more error codes situation and a less error codes situation, and wherein when there is a more error codes situation, a special image is output at the receiving end. 